The present invention relates to a frequency measuring apparatus, more specifically to a frequency measuring apparatus which is adapted to measure the frequency of an input signal with use of a microcomputer.
The conventional control apparatus for controlling an internal combustion engine device by use of a microcomputer is generally arranged to measure the frequency of a prescribed pulse signal by use of a timer function formed in the microcomputer, whereby the engine speed or the like is detected. Such an arrangement is disclosed in, for example, U.S. Pat. No. 4,517,831 which issued on May 21, 1985 and corresponds to Japanese Patent Public Disclosures No. 95465/84. The disclosed device is constructed in such a way that the calculating operation executed in the microcomputer is interrupted in response to the output of a pulse signal from a rotation sensor, the period of the pulse signal is measured by use of the timer, and the frequency of the pulse signal is calculated based on the period measured.
However, this arrangement leads to a problem in the case where the frequency of the signal being measured becomes high since in such a case the calculating operation conducted in the microcomputer is frequently interrupted, which hinders smooth execution of the main program by the microcomputer. This drawback is particularly a problem in a program in which the results obtained by the processing during the interruption is renewed at a predetermined interval, for example, once per program cycle of the main program. More specifically, in such a program, most of the results obtained during the interruptions become useless because of the high frequency of interruption processing and the only result is hinderance of the smooth execution of the main program